<?php
/**
 *   Joomdiet - components/views/foodinfotable/tmpl/default.php
 *   Author: Juan Dapena Paz (juan@bittingbits.com)
 *   Copyright (C) 2010 Bitting Bits S.L.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 defined('_JEXEC') or die('Restricted access');
?>
<div id="advise">
    <?php echo JText::_('COM_JOOMDIET_FOOD_RESULT_ADVISE').': '.($this->customizedamount*100).' gr.'; ?>
</div>
<div>
    <span><b><?php echo JText::_('COM_JOOMDIET_FOOD'); ?>:</b>
    <?php echo ' '.$this->food->name; ?></span>
    <?php if ($this->category) { ?>
        <span><b><?php echo JText::_('COM_JOOMDIET_PARENT_CATEGORY'); ?>:</b>
        <?php echo ' '.$this->category->name; ?></span>
    <?php } ?>
</div>
<div>
    <b><?php echo JText::_('COM_JOOMDIET_DESCRIPTION'); ?>:</b>
    <?php echo ' '.$this->food->description; ?>
</div>
<div>
    <?php $i = 0; ?>
    <table class="joomdiettable" width="100%">
        <?php foreach ($this->foodvariables as $foodvariable) { ?>
            <?php $variable = $this->variable_model->getVariable($foodvariable->id_variable); ?>
            <tr class="row<?php echo $i; ?>">
                <td width="80%">
                    <?php echo $variable->name; ?>
                </td>
                <td>
                    <?php echo ($foodvariable->amount*$this->customizedamount); ?>
                </td>
            </tr>
        <?php $i = 1 - $i; } ?>
    </table>
</div>

